﻿#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <cmath>
using namespace std;

int solution(int x, int y) 
{
    double dist = pow((pow(x, 2) + pow(y, 2)), 0.5);

    // 向上取整函数
    // 向下是 floor()
    int pos = ceil(dist);

    return pos > 11 ? 0 : 11 - pos;
}

int main() 
{
    cout << (solution(1, 0) == 10) << endl;
    cout << (solution(1, 1) == 9) << endl;
    cout << (solution(0, 5) == 6) << endl;
    cout << (solution(3, 4) == 6) << endl;
    return 0;
}